import Vue from "vue";
import Vuex from "vuex";
import home from "./module/home";
import search from "./module/search";
import detail from "./module/detail";
import trade from "./module/trade";
import shopcart from "./module/shopcart";
import product from "./module/product";
Vue.use(Vuex);

const state = {};
const mutations = {};
const actions = {};
const getters = {};
const modules = {
  // 模块的名字是这里的属性的名字
  home,
  search,
  detail,
  trade,
  shopcart,
  product
};

export default new Vuex.Store({
  state,
  mutations,
  actions,
  getters,
  modules,
});
